package com.ruoyi.project.treat.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.framework.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.Objects;
/**
 * 挂号表 treat_register
 *
 * @author ruoyi
 */
public class TreatRegister extends BaseEntity {
    /*挂号id*/
    private Integer registerId;
    /*挂号编号*/
    private String registerNumber;
    /*患者id（外键）*/
    private Integer registerPatientId;
    /*挂号费ID（外键）*/
    private Integer registerRegistraFeeId;
    /*病例id（外键）*/
    private Integer registerHistoryId;
    /*用户（医生）id（外键）*/
    private Integer registerUserId;
    /*就诊日期*/
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerDate;
    /*状态（0未收费,1代就诊，2正在就诊，3就诊完成）*/
    private String registerStatus;
    /*挂号时段（上午，下午，晚上）*/
    private String registerTime;

    /*患者属性*/
    private TreatPatient treatPatient;
    /*挂号类型属性*/
    private SystemTregistraFee systemTregistraFee;
    /*病历属性*/
    private TreatPatientHistory treatPatientHistory;
    /*用户属性*/
    private SystemUser systemUser;

    public TreatRegister() {
    }

    public TreatRegister(Integer registerId, String registerNumber, Integer registerPatientId, Integer registerRegistraFeeId, Integer registerHistoryId, Integer registerUserId, Date registerDate, String registerStatus, String registerTime, TreatPatient treatPatient, SystemTregistraFee systemTregistraFee, TreatPatientHistory treatPatientHistory, SystemUser systemUser) {
        this.registerId = registerId;
        this.registerNumber = registerNumber;
        this.registerPatientId = registerPatientId;
        this.registerRegistraFeeId = registerRegistraFeeId;
        this.registerHistoryId = registerHistoryId;
        this.registerUserId = registerUserId;
        this.registerDate = registerDate;
        this.registerStatus = registerStatus;
        this.registerTime = registerTime;
        this.treatPatient = treatPatient;
        this.systemTregistraFee = systemTregistraFee;
        this.treatPatientHistory = treatPatientHistory;
        this.systemUser = systemUser;
    }

    public Integer getRegisterId() {
        return registerId;
    }

    public void setRegisterId(Integer registerId) {
        this.registerId = registerId;
    }

    public String getRegisterNumber() {
        return registerNumber;
    }

    public void setRegisterNumber(String registerNumber) {
        this.registerNumber = registerNumber;
    }

    public Integer getRegisterPatientId() {
        return registerPatientId;
    }

    public void setRegisterPatientId(Integer registerPatientId) {
        this.registerPatientId = registerPatientId;
    }

    public Integer getRegisterRegistraFeeId() {
        return registerRegistraFeeId;
    }

    public void setRegisterRegistraFeeId(Integer registerRegistraFeeId) {
        this.registerRegistraFeeId = registerRegistraFeeId;
    }

    public Integer getRegisterHistoryId() {
        return registerHistoryId;
    }

    public void setRegisterHistoryId(Integer registerHistoryId) {
        this.registerHistoryId = registerHistoryId;
    }

    public Integer getRegisterUserId() {
        return registerUserId;
    }

    public void setRegisterUserId(Integer registerUserId) {
        this.registerUserId = registerUserId;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public String getRegisterStatus() {
        return registerStatus;
    }

    public void setRegisterStatus(String registerStatus) {
        this.registerStatus = registerStatus;
    }

    public String getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(String registerTime) {
        this.registerTime = registerTime;
    }

    public TreatPatient getTreatPatient() {
        return treatPatient;
    }

    public void setTreatPatient(TreatPatient treatPatient) {
        this.treatPatient = treatPatient;
    }

    public SystemTregistraFee getSystemTregistraFee() {
        return systemTregistraFee;
    }

    public void setSystemTregistraFee(SystemTregistraFee systemTregistraFee) {
        this.systemTregistraFee = systemTregistraFee;
    }

    public TreatPatientHistory getTreatPatientHistory() {
        return treatPatientHistory;
    }

    public void setTreatPatientHistory(TreatPatientHistory treatPatientHistory) {
        this.treatPatientHistory = treatPatientHistory;
    }

    public SystemUser getSystemUser() {
        return systemUser;
    }

    public void setSystemUser(SystemUser systemUser) {
        this.systemUser = systemUser;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TreatRegister that = (TreatRegister) o;
        return Objects.equals(registerId, that.registerId) &&
                Objects.equals(registerNumber, that.registerNumber) &&
                Objects.equals(registerPatientId, that.registerPatientId) &&
                Objects.equals(registerRegistraFeeId, that.registerRegistraFeeId) &&
                Objects.equals(registerHistoryId, that.registerHistoryId) &&
                Objects.equals(registerUserId, that.registerUserId) &&
                Objects.equals(registerDate, that.registerDate) &&
                Objects.equals(registerStatus, that.registerStatus) &&
                Objects.equals(registerTime, that.registerTime) &&
                Objects.equals(treatPatient, that.treatPatient) &&
                Objects.equals(systemTregistraFee, that.systemTregistraFee) &&
                Objects.equals(treatPatientHistory, that.treatPatientHistory) &&
                Objects.equals(systemUser, that.systemUser);
    }

    @Override
    public int hashCode() {
        return Objects.hash(registerId, registerNumber, registerPatientId, registerRegistraFeeId, registerHistoryId, registerUserId, registerDate, registerStatus, registerTime, treatPatient, systemTregistraFee, treatPatientHistory, systemUser);
    }

    @Override
    public String toString() {
        return "TreatRegister{" +
                "registerId=" + registerId +
                ", registerNumber='" + registerNumber + '\'' +
                ", registerPatientId=" + registerPatientId +
                ", registerRegistraFeeId=" + registerRegistraFeeId +
                ", registerHistoryId=" + registerHistoryId +
                ", registerUserId=" + registerUserId +
                ", registerDate=" + registerDate +
                ", registerStatus='" + registerStatus + '\'' +
                ", registerTime='" + registerTime + '\'' +
                ", treatPatient=" + treatPatient +
                ", systemTregistraFee=" + systemTregistraFee +
                ", treatPatientHistory=" + treatPatientHistory +
                ", systemUser=" + systemUser +
                '}';
    }
}
